home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  4.6 KB  |  149 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Contains:    AppleScript Generic Component Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  19. __OSAGENERIC__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  25.     include 'AppleEvents.a'
  26.     ENDIF
  27.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  28.     include 'OSA.a'
  29.     ENDIF
  30.  
  31. ;      NOTE:    This interface defines a "generic scripting component."
  32. ;            The Generic Scripting Component allows automatic dispatch to a
  33. ;            specific scripting component that conforms to the OSA interface.
  34. ;            This component supports OSA, by calling AppleScript or some other 
  35. ;            scripting component.  Additionally it provides access to the default
  36. ;            and the user-prefered scripting component.
  37. ;
  38.  
  39.  
  40.  
  41.  
  42.                                                             ; Component version this header file describes 
  43. kGenericComponentVersion        EQU        $0100
  44.  
  45. kGSSSelectGetDefaultScriptingComponent EQU $1001
  46. kGSSSelectSetDefaultScriptingComponent EQU $1002
  47. kGSSSelectGetScriptingComponent    EQU        $1003
  48. kGSSSelectGetScriptingComponentFromStored EQU $1004
  49. kGSSSelectGenericToRealID        EQU        $1005
  50. kGSSSelectRealToGenericID        EQU        $1006
  51. kGSSSelectOutOfRange            EQU        $1007
  52. ; typedef OSType                         ScriptingComponentSelector
  53.  
  54. ; typedef OSAID                         GenericID
  55.  
  56. ;  get and set the default scripting component 
  57. ;
  58. ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  59. ;
  60.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  61.         Macro
  62.         _OSAGetDefaultScriptingComponent
  63.             move.l              #$00041001,-(sp)
  64.             moveq               #0,D0
  65.             dc.w                $A82A
  66.         EndM
  67.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  68.         IMPORT_CFM_FUNCTION OSAGetDefaultScriptingComponent
  69.     ENDIF
  70.  
  71. ;
  72. ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  73. ;
  74.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  75.         Macro
  76.         _OSASetDefaultScriptingComponent
  77.             move.l              #$00041002,-(sp)
  78.             moveq               #0,D0
  79.             dc.w                $A82A
  80.         EndM
  81.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  82.         IMPORT_CFM_FUNCTION OSASetDefaultScriptingComponent
  83.     ENDIF
  84.  
  85. ;  get a scripting component instance from its subtype code 
  86. ;
  87. ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  88. ;
  89.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  90.         Macro
  91.         _OSAGetScriptingComponent
  92.             move.l              #$00081003,-(sp)
  93.             moveq               #0,D0
  94.             dc.w                $A82A
  95.         EndM
  96.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  97.         IMPORT_CFM_FUNCTION OSAGetScriptingComponent
  98.     ENDIF
  99.  
  100. ;  get a scripting component selector (subType) from a stored script 
  101. ;
  102. ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  103. ;
  104.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  105.         Macro
  106.         _OSAGetScriptingComponentFromStored
  107.             move.l              #$00081004,-(sp)
  108.             moveq               #0,D0
  109.             dc.w                $A82A
  110.         EndM
  111.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  112.         IMPORT_CFM_FUNCTION OSAGetScriptingComponentFromStored
  113.     ENDIF
  114.  
  115. ;  get a real component instance and script id from a generic id 
  116. ;
  117. ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  118. ;
  119.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  120.         Macro
  121.         _OSAGenericToRealID
  122.             move.l              #$00081005,-(sp)
  123.             moveq               #0,D0
  124.             dc.w                $A82A
  125.         EndM
  126.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  127.         IMPORT_CFM_FUNCTION OSAGenericToRealID
  128.     ENDIF
  129.  
  130. ;  get a generic id from a real component instance and script id 
  131. ;
  132. ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  133. ;
  134.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  135.         Macro
  136.         _OSARealToGenericID
  137.             move.l              #$00081006,-(sp)
  138.             moveq               #0,D0
  139.             dc.w                $A82A
  140.         EndM
  141.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  142.         IMPORT_CFM_FUNCTION OSARealToGenericID
  143.     ENDIF
  144.  
  145.  
  146.  
  147.     ENDIF ; __OSAGENERIC__ 
  148.  
  149.